<script lang="ts" setup>
import { CellGroup, Field } from 'vant'

type TitleName = [string, string]
type TitleNameType = [string, string, string]

defineProps<{
  obj: any
  // title: name
  properties: (TitleName | TitleNameType)[]
}>()
</script>

<template>
  <CellGroup>
    <Field
      v-for="(item, index) in properties"
      :key="index" v-model="obj[item[1]]"
      :name="item[0]"
      :label="item[0]"
      :placeholder="item[0]"
    />
  </CellGroup>
</template>
